package kpi.javatraining6.gnatiuk.tests;

import kpi.javatraining6.gnatiuk.src.tester.question.Question;
import kpi.javatraining6.gnatiuk.src.tester.question.QuestionWithTopic;
import kpi.javatraining6.gnatiuk.src.tester.question.SingleAnswerQuestion;
import org.junit.Test;
import static org.junit.Assert.*;

import java.util.ArrayList;

public class QuestionWithTopicTest {
    @Test
    public void testGetTopic() throws Exception {
        Question question = new SingleAnswerQuestion("EASY", "", new ArrayList<String>(), new ArrayList<String>());
        question = new QuestionWithTopic(question, "OOP");
        assertEquals("OOP", question.getTopic());
    }

    @Test
    public void testDetermineQuestionNote() throws Exception {
        Question question = new SingleAnswerQuestion("EASY", "", new ArrayList<String>(), new ArrayList<String>());
        question = new QuestionWithTopic(question, "OOP");
        assertEquals(" (only one answer)\n", question.toString());
    }
}
